package com.atwisdom.star.common.vo;

public enum ModelType {
    //操作
    Entity("entity","实体模型"),
    Consume("consume","消费者模型"),
    Resource("resource","资源模型"),
    Logic("logic","多实例逻辑模型"),
    StaticLogic("staticLogic","静态逻辑模型"),
    Twins("twins","孪生模型"),
    Tank("Tank","装箱模型"),
    Template("template","模板模型"),
    WorkCenter("workCenter","关系模型"),
    Monitor("monitor","监控模型"),
    Planner("planner","计划模型"),
    Process("process","流程模板"),
    OaProcess("oaProcess","审批流程模型"),
    Routing("routing","工艺路线模板"),
    SimpleMap("simpleMap","单线图模板"),
    Bi("bi","可视化模型"),
    Statistics("statistics","统计模型"),
    StatisticsRelation("statisticsRelation","统计模板模型"),
    Hier("hier","hier模型");

    //容器
    private String code;

    private String description;

    public String getCode() {
        return code;
    }

    public String getDescription() {
        return description;
    }

    public static ModelType getByCode(String code){
        for (ModelType constants : values()) {
            String curCode = constants.getCode();
            if (curCode.equalsIgnoreCase(code)) {
                return constants;
            }
        }
        return Entity;
    }

    private ModelType(String code, String description){
        this.code = code;
        this.description = description;
    }
}
